using System;

using octalforty.Componento.NuGet;
using octalforty.Componento.Shared.SemanticModel;

using System.Linq;

namespace octalforty.Componento.ComponentModel.Installation
{
    [ResourceProvider]
    public class NuGetResourceProvider : IResourceProvider
    {
        public bool CanProvideResourcesFrom(Uri uri)
        {
            return uri.Scheme.ToLowerInvariant() == "nuget";
        }

        public Uri[] GetResources(Uri uri, string packageName, VersionSpecification versionSpecification)
        {
            var nuGetRepository = new GalleryFeedContext(uri);
            var packages = nuGetRepository.Packages.Where(p => p.Title == packageName);

            return null;
        }
    }
}